<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="app">
        <ul>
            <!-- v-for基本语法v-for="item in items" v-for="(item，index) in items"
            items是源数据数组，item是当前遍历数组的元素别名，index是当前索引-->
            <li v-for="(item,index) in books">{{index}}-{{item.title}}</li>
        </ul>
    </div>
    <script>
        var vm=new Vue({
            el:"#app",
            data:{
                books:[
                    {title:"Vue无难事"},
                    {title:"VC++深入详解"},
                    {title:"Servlet/JSP"}
                ]
            }
        })
    </script>
</body>
</html>